# Maintainer: Daniel Bermond <dbermond@archlinux.org>
# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=rkcommon
pkgver=1.11.0
pkgrel=1
pkgdesc="Intel RenderKit common C++/CMake infrastructure"
arch=(loong64 x86_64)
url="https://github.com/ospray/rkcommon/"
license=(Apache)
depends=(gcc-libs glibc onetbb)
makedepends=(cmake)
source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('9cfeedaccdefbdcf23c465cb1e6c02057100c4a1a573672dc6cfea5348cedfdd')

build() {
  cmake -B build -S ${pkgname}-${pkgver} \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -Wno-dev
  make -C build
}

check() {
  make -C build test
}

package() {
  make -C build DESTDIR="${pkgdir}" install
}
